Add encrypted-notes-dapp example based on vetKD #569
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a copy of the
encrypted-notes-dapp
example, adapted to use the proposed vetKD feature.In particular, instead of creating a principal-specific AES key and syncing it across devices (by means of device-specific RSA keys), the notes are encrypted with an AES key that is derived (directly in the browser) from a principal-specific vetKey obtained from the backend canister (in encrypted form, using an ephemeral transport key), which itself obtains it from the vetKD system API. This way, there is no need for any device management in the dapp.
The difference between the original encrypted-notes-dapp and the this one here can be seen in #561.
Note the Disclaimer in the README.md.
Disclaimer
This example uses an insecure implementation of the proposed vetKD system API in a pre-compiled form via the
vetkd_system_api.wasm
. This is not intended for use in production or for sensitive data! This example is solely provided for demonstration purposes to collect feedback on the mentioned vetKD system API. This disclaimer is also included in the README.